]> dgit.raspbian.org Git - gnome-shell.git/commit
js: Promisify async operations
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 19 Dec 2019 19:50:37 +0000 (20:50 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Tue, 31 Mar 2020 05:43:40 +0000 (05:43 +0000)
commit764527c8c9b7659901eb6296a6859ae2b0eabdb8
tree105a7ed0e261e1de3f8822e760fb9a35966e0eb3
parent18742fcc329d890be1cbd3c7ea95c1c34f66f79e
js: Promisify async operations

Promises make asynchronous operations easier to manage, in particular
when used through the async/await syntax that allows for asynchronous
code to closely resemble synchronous one.

gjs has included a Gio._promisify() helper for a while now, which
monkey-patches methods that follow GIO's async pattern to return a
Promise when called without a callback argument.

Use that to get rid of all those GAsyncReadyCallbacks!

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1126
20 files changed:
js/gdm/util.js
js/misc/ibusManager.js
js/misc/inputMethod.js
js/misc/loginManager.js
js/misc/objectManager.js
js/misc/weather.js
js/ui/appDisplay.js
js/ui/calendar.js
js/ui/components/networkAgent.js
js/ui/components/telepathyClient.js
js/ui/endSessionDialog.js
js/ui/environment.js
js/ui/panel.js
js/ui/remoteSearch.js
js/ui/screenshot.js
js/ui/shellDBus.js
js/ui/status/keyboard.js
js/ui/status/network.js
js/ui/status/thunderbolt.js
subprojects/extensions-app/js/main.js